home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Freeware / Adobe Air 1.5 / AdobeAIRInstaller.exe / setup.swf / scripts / mx / events / ValidationResultEvent.as < prev   
Encoding:
Text File  |  2008-10-29  |  1.3 KB  |  51 lines

  1. package mx.events
  2. {
  3.    import flash.events.Event;
  4.    import mx.core.mx_internal;
  5.    
  6.    use namespace mx_internal;
  7.    
  8.    public class ValidationResultEvent extends Event
  9.    {
  10.       mx_internal static const VERSION:String = "3.0.0.0";
  11.       
  12.       public static const INVALID:String = "invalid";
  13.       
  14.       public static const VALID:String = "valid";
  15.       
  16.       public var results:Array;
  17.       
  18.       public var field:String;
  19.       
  20.       public function ValidationResultEvent(param1:String, param2:Boolean = false, param3:Boolean = false, param4:String = null, param5:Array = null)
  21.       {
  22.          super(param1,param2,param3);
  23.          this.field = param4;
  24.          this.results = param5;
  25.       }
  26.       
  27.       public function get message() : String
  28.       {
  29.          var _loc1_:String = "";
  30.          var _loc2_:int = int(results.length);
  31.          var _loc3_:int = 0;
  32.          while(_loc3_ < _loc2_)
  33.          {
  34.             if(results[_loc3_].isError)
  35.             {
  36.                _loc1_ += _loc1_ == "" ? "" : "\n";
  37.                _loc1_ += results[_loc3_].errorMessage;
  38.             }
  39.             _loc3_++;
  40.          }
  41.          return _loc1_;
  42.       }
  43.       
  44.       override public function clone() : Event
  45.       {
  46.          return new ValidationResultEvent(type,bubbles,cancelable,field,results);
  47.       }
  48.    }
  49. }
  50.  
  51.